//
//  NSObject+Cast.h
//  Ares
//
//  Created by cola tin on 16/1/29.
//  Copyright © 2016年 linkedcare.cn. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (LCUtils)

+ (instancetype)cast:(id)object;
- (BOOL)isNSNull;

@end

@implementation NSObject (LCUtils)

+ (instancetype)cast:(id)object {
    return [object isKindOfClass:self] ? object : nil;
}
- (BOOL)isNSNull{
    return [self isKindOfClass:NSNull.class];
}

@end
